<script setup>
	import SongItem from "./SongItem";
	const props = defineProps({
		title: {
			type: String,
			default: "",
		},
		list: {
			type: Array,
			default: () => [],
		},
		type: {
			type: String,
			default: "song",
		},
	});
</script>

<template>
	<section class="recent-play">
		<div class="title">
			<h2 style="font-size: 20px">{{ props.title }}</h2>
			<div style="font-size: 12px" v-if="props.type === 'song'">
				<span>View All</span>
				<uni-icons type="right" color="red" size="14" />
			</div>
		</div>
		<div class="play-list">
			<SongItem v-for="i in 5" :key="i" :type="props.type" />
		</div>
	</section>
</template>

<style lang="scss" scoped>
	.recent-play {
		margin-top: 47px;
		padding-bottom: 2px;
		box-sizing: border-box;
		border-bottom: 1px solid rgba(#c2faf1, 0.2);
	}
	.title {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.play-list {
		display: flex;
		overflow-x: auto;
	}
</style>
